#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <dequeue.h>

dequeue *get_fita_vazia(dequeue**, int);

int main(void)
{
    char *entrada = NULL;
    char *mem = NULL;
    int tam_entrada = 30;
    int tam_mem = 3;

    entrada = calloc(tam_entrada, sizeof(*entrada));
    mem = calloc(tam_mem, sizeof(*mem));

    dequeue **fitas = NULL;
    int qtd_fitas = 3;
    int tam_fita = 30;

    fitas = calloc(qtd_fitas, sizeof(*fitas));

    for(int i = 0; i < qtd_fitas; i++)
    {
        fitas[i] = new_dequeue();
    }

    printf("%p\n", get_fita_vazia(fitas, qtd_fitas));

    return 0;
}

dequeue *get_fita_vazia(dequeue **dequeues, int length)
{
    dequeue *empty_queue = NULL;

    for(int i = 0; i < length; i++)
    {
        if(dequeues[i][0].length == 0)
        {
            empty_queue = dequeues[i];
            break;
        }
    }

    return empty_queue;
}
